/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package replica.transaction;

import java.io.File;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import replica.stableMemory.StableFile;
import replica.transaction.TransactionStatus.Type;

/**
 *
 * @author andrea
 */
public class ReplicaManagerLogRegister extends LogRegister
{
    long idReplicaManager;


    public ReplicaManagerLogRegister(long idFrontEnd, StableFile<TransactionStatus> stableFile, long idReplicaManager)
    {
        super(idFrontEnd,stableFile);
        this.idReplicaManager=idReplicaManager;
        //File file = new File(getNameFile());
    }
    
    @Override
    public List<Type> getPersistentStatuses() {
        Type[] statuses={Type.OK,Type.COMMIT,Type.READY};
        return Arrays.asList(statuses);
    }
    
    @Override
    public String getNameFile() {
        return "files/LogRegister/ReplicaManager_"+super.idFrontEnd+"_"+this.idReplicaManager+"/";
    }
    
}
